package com.ruoyi.boss.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.boss.mapper.TSendServiceMapper;
import com.ruoyi.boss.domain.TSendService;
import com.ruoyi.boss.service.ITSendServiceService;

/**
 * 可服务司机Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-18
 */
@Service
public class TSendServiceServiceImpl implements ITSendServiceService 
{
    @Autowired
    private TSendServiceMapper tSendServiceMapper;

    /**
     * 查询可服务司机
     * 
     * @param sendServiceId 可服务司机主键
     * @return 可服务司机
     */
    @Override
    public TSendService selectTSendServiceBySendServiceId(Long sendServiceId)
    {
        return tSendServiceMapper.selectTSendServiceBySendServiceId(sendServiceId);
    }

    /**
     * 查询可服务司机列表
     * 
     * @param tSendService 可服务司机
     * @return 可服务司机
     */
    @Override
    public List<TSendService> selectTSendServiceList(TSendService tSendService)
    {
        return tSendServiceMapper.selectTSendServiceList(tSendService);
    }

    /**
     * 新增可服务司机
     * 
     * @param tSendService 可服务司机
     * @return 结果
     */
    @Override
    public int insertTSendService(TSendService tSendService)
    {
        tSendService.setCreateTime(DateUtils.getNowDate());
        return tSendServiceMapper.insertTSendService(tSendService);
    }

    /**
     * 修改可服务司机
     * 
     * @param tSendService 可服务司机
     * @return 结果
     */
    @Override
    public int updateTSendService(TSendService tSendService)
    {
        tSendService.setUpdateTime(DateUtils.getNowDate());
        return tSendServiceMapper.updateTSendService(tSendService);
    }

    /**
     * 批量删除可服务司机
     * 
     * @param sendServiceIds 需要删除的可服务司机主键
     * @return 结果
     */
    @Override
    public int deleteTSendServiceBySendServiceIds(Long[] sendServiceIds)
    {
        return tSendServiceMapper.deleteTSendServiceBySendServiceIds(sendServiceIds);
    }

    /**
     * 删除可服务司机信息
     * 
     * @param sendServiceId 可服务司机主键
     * @return 结果
     */
    @Override
    public int deleteTSendServiceBySendServiceId(Long sendServiceId)
    {
        return tSendServiceMapper.deleteTSendServiceBySendServiceId(sendServiceId);
    }
}
